$webwork.htmlEncode($page.space.name) : Google Maps SLD
This page last changed on Apr 09, 2007 by cholmes.
Work has been done by several people to get Google Maps type styling in SLD. This page will be a shared resource on how people have done it, and hopefully will turn in to a full blown tutorial on how to make your own google maps with GeoServer. There are currently three different attempts. Tutorial 1 is just a sample SLD that you can download and see how it was done. Tutorial 2 walks through more specifics of how to do it. And Geoserver and Google SLDs is an end user tutorial on setting up http://sigma.openplans.org styles. Tutorial 1You can download GĂ©rald's SLD files: basemap_sld.zip Tutorial 2
IntroductionThis tutorial was written from a Windows perspective for the geographical region of one county. The primary focus of the tutorial, at this time, is to display road centerline data in a manner consistent with the look and feel of a Google map. At a later date, some of the finer details will be added to the tutorial to complete the overall appearance of a Google-style map. The tutorial assumes that you have already installed PostgreSQL, PostGIS and Geoserver. The PostgreSQL database name chosen for this example is called "postgis" with a "postgres" user and "postgres" as the password. The tutorial also assumes that you have the following shapefile data available. 1. "roads.shp" (line) with the following fields: For simplicity, put all of the shapefiles in one folder. This tutorial also assumes all your shapefile data is in WGS84 (SRS=4326). If your shapefile data is in Geographic NAD83 (which is a more common geographic coordinate system within the GIS community), don't worry, that's close enough for this demonstration. You will need a MapBuilder site to review your data at the end of the tutoral. Additionally SLD files are required to complete this tutorial. Both can be found here. Step 1 - Load shapefiles into the PostGIS database1. Open a Command Window (Note:The shp2pgsql commands above will write sql files into the same directory as your shapefiles.) 7. Open up PgAdmin III and select the "postgis" database Step 2 - Set up the Datastore, Styles, and FeatureTypes in GeoServer1. Make sure GeoServer has been started StyleID: googlesque_roads StyleID: googlesque_corporatelimits StyleID: googlesque_water StyleID: googlesque_countyboundaries 13. Click Apply and Save on the left. Setting up the Map Builder site1. Copy the samplesite folder to: C:\<your geoserver 1.3.4 directory>\server\geoserver\data\mbdemos\demo\ directory Opening the Map Builder Sample Site1. Point your browser to: http://127.0.0.1:8080/geoserver/data/mbdemos/demo/samplesite/index.html ![]() ![]() ![]() ![]()
|
![]() |
Document generated by Confluence on Jan 16, 2008 23:27 |